package com.xinxin.leetcode.problem598;

/**
 * @author ShiXinXin
 * @date 2020-02-08 12:53
 */
public class Solution {
    public int maxCount(int m, int n, int[][] ops) {
        int minX = m, minY = n;
        for (int i = 0; i < ops.length; i++) {
            minX = Math.min(minX, ops[i][0]);
            minY = Math.min(minY, ops[i][1]);
        }
        return minX * minY;
    }

    public static void main(String[] args) {
        int[][] operations = {{2, 2}, {3, 3}};
        System.out.println(new Solution().maxCount(3, 3, operations));
    }
}
